3b267954aac2a5e6f8fe771500c7c9720a7e8420,messaging-activemq/src/main/java/org/wildfly/extension/messaging/activemq/jms/JMSQueueAdd.java,JMSQueueAdd,performRuntime,#OperationContext#ModelNode#ModelNode#,60

Before Change


        // dependencies from the BinderServices to the JMSQueueService are not broken
        Service<Queue> queueService = JMSQueueService.installService(name, serviceTarget, serviceName, selector, durable, new String[0]);

        final ModelNode entries = CommonAttributes.DESTINATION_ENTRIES.resolveModelAttribute(context, model);
        final ServiceName jmsQueueServiceName = JMSServices.getJmsQueueBaseServiceName(serviceName).append(name);
        final String[] jndiBindings = JMSServices.getJndiBindings(entries);
        for (String jndiBinding : jndiBindings) {
            // install a binder service which depends on the JMS queue service
            BinderServiceUtil.installBinderService(serviceTarget, jndiBinding, queueService, jmsQueueServiceName);

After Change


    protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
        final String name = context.getCurrentAddressValue();
        final ServiceTarget serviceTarget = context.getServiceTarget();
        final ServiceName serviceName = MessagingServices.getActiveMQServiceName(context.getCurrentAddress());

        final ModelNode selectorNode = SELECTOR.resolveModelAttribute(context, model);
        final boolean durable = DURABLE.resolveModelAttribute(context, model).asBoolean();

        final String selector = selectorNode.isDefined() ? selectorNode.asString() : null;

        // Do not pass the JNDI bindings to ActiveMQ but install them directly instead so that the
        // dependencies from the BinderServices to the JMSQueueService are not broken
        Service<Queue> queueService = JMSQueueService.installService(name, serviceTarget, serviceName, selector, durable, new String[0]);

        final ServiceName jmsQueueServiceName = JMSServices.getJmsQueueBaseServiceName(serviceName).append(name);
        for (String entry : CommonAttributes.DESTINATION_ENTRIES.unwrap(context, model)) {
            BinderServiceUtil.installBinderService(serviceTarget, entry, queueService, jmsQueueServiceName);
        }

        List<String> legacyEntries = CommonAttributes.LEGACY_ENTRIES.unwrap(context, model);
        if (!legacyEntries.isEmpty()) {
            Queue legacyQueue = HornetQJMSClient.createQueue(name);
            for (String legacyEntry : legacyEntries) {